# 输出二维数组
def show2d(b):
    for i in range(len(b)):
        for j in range(len(b[i])):
            print(b[i][j], end=" ")
        print()


# 创建一个二维数组 长度为row 宽度为col
def create2d(row, col):
    b = []
    for i in range(row):
        b.append(list([0] * col))
    return b


def main():
    a, b, c = map(int, input().split())
    x, y, z = map(int, input().split())
    B = create2d(2, 3)
    C = create2d(3, 2)
    B[0][0] = a
    B[0][1] = b
    B[0][2] = c
    B[1][0] = x
    B[1][1] = y
    B[1][2] = z
    C[0][0] = a
    C[0][1] = x
    C[1][0] = b
    C[1][1] = y
    C[2][0] = c
    C[2][1] = z
    show2d(C)


main()
